package com.newly.common.base.entity.business.Po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
* @anthor sbq
* @date 2021/10/25 11:26
*/
@Data
@TableName(value = "gov_site")
public class Site implements Serializable {
    /**
     * 站点id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /**
     * 所属公司(单位)
     */
    @TableField(value = "company_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long companyId;

    /**
     * 站点名称
     */
    @NotBlank(message = "站点名称不能为空")
    @TableField(value = "name")
    private String name;

    /**
     * 站点简称
     */
    @TableField(value = "site_alias")
    private String siteAlias;

    /**
     * 站点编码
     */
    @TableField(value = "site_code")
    private String siteCode;

    /**
     * 站点类型,类型待议
     */
    @NotNull(message = "站点类型不能为空")
    @TableField(value = "type")
    private Integer type;

    /**
     * 站点负责人
     */
    @NotBlank(message = "站点负责人不能为空")
    @TableField(value = "site_agent")
    private String siteAgent;

    /**
     * 检测方向
     */
    @TableField(value = "check_direction")
    private String checkDirection;

    /**
     * 车道数量
     */
    @TableField(value = "lane_num")
    private Integer laneNum;

    /**
     * 站点所在路段名
     */
    @TableField(value = "road_name")
    private String roadName;

    /**
     * 0-正常 1-已删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private String longitude;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private String latitude;

    /**
     * 位置
     */
    @TableField(value = "location")
    private String location;

    /**
     * 建设时间
     */
    @TableField(value = "construct_time")
    private Date constructTime;

    /**
     * 完成建设时间（运营时间）
     */
    @TableField(value = "complete_time")
    private Date completeTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 省份编号
     */
    @TableField(value = "province_code")
    private String provinceCode;

    /**
     * 城市编号
     */
    @TableField(value = "city_code")
    private String cityCode;

    /**
     * 区/县编号
     */
    @TableField(value = "area_code")
    private String areaCode;

    /**
     * 街道/镇编号
     */
    @TableField(value = "street_code")
    private String streetCode;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 站点网关id
     */
    @TableField(value = "product_key")
    private String productKey;

    /**
     * 网关sip编码，即SIP用户名
     */
    @TableField(value = "sip_id")
    private String sipId;

    /**
     * 企业名称
     */
    @NotBlank(message = "企业名称不能为空")
    @TableField(exist = false)
    private String companyName;

    /**
     * 超重次数
     */
    @TableField(exist = false)
    private Integer overweightNum = 0;

    /**
     * 权限id
     */
    @TableField(exist = false)
    private Integer permId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_COMPANY_ID = "company_id";

    public static final String COL_NAME = "name";

    public static final String COL_TYPE = "type";

    public static final String COL_SITE_AGENT = "site_agent";

    public static final String COL_CHECK_DIRECTION = "check_direction";

    public static final String COL_LANE_NUM = "lane_num";

    public static final String COL_ROAD_NAME = "road_name";

    public static final String COL_LONGITUDE = "longitude";

    public static final String COL_LATITUDE = "latitude";

    public static final String COL_LOCATION = "location";

    public static final String COL_CONSTRUCT_TIME = "construct_time";

    public static final String COL_COMPLETE_TIME = "complete_time";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_PROVINCE_CODE = "province_code";

    public static final String COL_CITY_CODE = "city_code";

    public static final String COL_AREA_CODE = "area_code";

    public static final String COL_STREET_CODE = "street_code";
}